using System;
using System.Diagnostics;
using Needle.Utils.Parser;

namespace Needle.Templates
{
    [Serializable]
    [DebuggerDisplay("[{Line},{Column}] Token {TemplateType}: {Value}")]
    public class TemplateToken : StringToken
    {

        public TemplateToken(string value,
            TokenType type,
            TemplateTokenType ttType,
            int line,
            int column,
            int index)
            : base(value, type, line, column, index)
        {
            _TemplateType = ttType;
        }

        private TemplateTokenType _TemplateType;
        public TemplateTokenType TemplateType
        {
            get { return _TemplateType; }
        }

        public override string ToString()
        {
            return String.Format("[{2,4},{3,3}] {0,-12}: \'{1}\'", _TemplateType, Value, Line, Column);
        }
    }
}
